package com.company.service.impl;


import com.company.dao.IAccountDao;
import com.company.service.IAccountService;
import org.springframework.stereotype.Component;

/**
 * @date : 2022/3/25 16:22
 * <p>
 * 服务层实现类
 */

@Component("annotationAccountServiceImpl")
public class AnnotationAccountServiceImpl implements IAccountService {

    // 数据访问层接口
    private IAccountDao accountDao;

    /**
     * 通过带参数的构造方法让Spring进行依赖注入
     *
     * @param accountDao 需要注入的bean
     */
    public AnnotationAccountServiceImpl(IAccountDao accountDao) {
        this.accountDao = accountDao;
    }

    @Override
    public void saveAccount() {
        accountDao.saveAccount();
    }
}
